package com.carleasoft.mps.cms.business.article.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.carleasoft.mps.cms.business.article.bean.entity.AuthorityArticleEntity;
import com.carleasoft.mps.cms.business.article.bean.po.ArticlePagePo;
import com.carleasoft.mps.cms.business.article.bean.po.ArticlePo;
import com.carleasoft.mps.cms.business.article.bean.vo.ArticlePageVo;
import com.carleasoft.mps.cms.business.article.bean.vo.SlideshowEIPVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>Description: 文章 ArticleDao</p>
 * @since 2021/7/5
 * @author taoyujing
 */
@Mapper
public interface ArticleDao extends BaseMapper<AuthorityArticleEntity> {

    /**
     * 后台分页查询
     * @param page,CategoryPageVo
     * @return List
     */
    Page<ArticlePageVo> pageQuery(Page page, ArticlePagePo articlePo);

    /**
     * 通过栏目获得文章简章
     */
    Page<SlideshowEIPVo> EIPPageQuery(Page page,  ArticlePo articlePo);

    /**
     * 头条信息查询
     */
    Page<SlideshowEIPVo> topPageQuery(Page<ArticlePo> page, ArticlePo articlePo);

    List<SlideshowEIPVo> homePage(String categoryCode);
}
